/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Pan_Auth.java
 *
 * Created on 25 juil. 2009, 02:19:59
 */

package view.ihm;

import view.com.PgButton;
import java.awt.Graphics;
import java.awt.Image;

/**
 *
 * @author willy
 */
public class PanAuth extends javax.swing.JPanel {

    /** Creates new form Pan_Auth */
    public PanAuth() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        txt_login = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        bt_ok = new PgButton();
        bt_can = new PgButton();
        txt_pass = new javax.swing.JPasswordField();

        txt_login.setFont(new java.awt.Font("Calibri", 0, 13));

        jLabel1.setFont(new java.awt.Font("Calibri", 3, 13));
        jLabel1.setForeground(new java.awt.Color(0, 51, 102));
        jLabel1.setText("Login");

        jLabel2.setFont(new java.awt.Font("Calibri", 3, 13));
        jLabel2.setForeground(new java.awt.Color(0, 51, 102));
        jLabel2.setText("Mot de passe");

        bt_ok.setFont(new java.awt.Font("Calibri", 0, 13));
        bt_ok.setText("OK");

        bt_can.setFont(new java.awt.Font("Calibri", 0, 13));
        bt_can.setText("Annuler");
        bt_can.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_canActionPerformed(evt);
            }
        });

        txt_pass.setFont(new java.awt.Font("Calibri", 0, 13));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(44, 44, 44)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txt_login)
                            .addComponent(txt_pass, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(bt_ok, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(bt_can, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txt_login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addGap(29, 29, 29)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txt_pass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bt_ok)
                    .addComponent(bt_can))
                .addContainerGap(41, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void bt_canActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_canActionPerformed
        System.exit(1);        // TODO add your handling code here:
    }//GEN-LAST:event_bt_canActionPerformed


    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
            Image image = (new javax.swing.ImageIcon(getClass().getResource("/img/poker-logo.jpg"))).getImage();
            g.drawImage(image, 0, 0, null);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton bt_can;
    public javax.swing.JButton bt_ok;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    public javax.swing.JTextField txt_login;
    public javax.swing.JPasswordField txt_pass;
    // End of variables declaration//GEN-END:variables

}
